feat: add Khipro compositional input method#49
Conversation
Introduce a third input-method category alongside phonetic and fixed: "compositional", which turns a roman key sequence into Bengali through a deterministic engine. Khipro is the first such layout, driven by an embedded m17n `.mim` spec. - src/compositional/: CompositionalEngine trait, Method impl (tape replay + backspace), and a pure-Rust port of the khipro library's s-expression parser, spec AST, and FSM interpreter (mim/). - config: add LayoutMethod + compositional_suggestion setting; recognize the built-in "khipro" layout name. - context: dispatch to CompositionalMethod via layout_method(). - ffi: riti_config_set_compositional_suggestion (+ riti.h declaration). The first candidate is the exact Khipro composition; dictionary/emoji suggestions follow, as with the fixed method. The candidate-window auxiliary text shows the raw roman keystrokes. Vendored data (data/khipro/), MIT licensed: - bn-khipro.mim (c) 2024 rank_coder - embedded at runtime - khipro-testcases.csv - used only by the #[cfg(test)] conformance test
|
@qomarhsn Hi! Thanks for the pull request! But have you checked the OpenBangla/OpenBangla-Keyboard#426 ticket beforehand? We already have Khipro support in the Okkhor crate. The remaining work was about generating suggestions for Khipro, which I have done initially in the Can you give me the rationale why we should proceed to have a .mim based layout system? |
I had seen this discussion initially, but I forgot about it while implementing Khipro in Riti.
I think it would be better to use Upodesh's existing suggestion mechanism for Bangla/fixed layouts based on Khipro's composed Bengali output, rather than introducing an Avro-style suggestion mechanism. Since Khipro already produces the composed Bengali output, I believe this approach should be sufficient and would likely work better for Khipro. |
Introduce a third input-method category alongside phonetic and fixed: "compositional", which turns a roman key sequence into Bengali through a deterministic engine. Khipro is the first such layout, driven by an embedded m17n
.mimspec.The first candidate is the exact Khipro composition; dictionary/emoji suggestions follow, as with the fixed method. The candidate-window auxiliary text shows the raw roman keystrokes.
Vendored data (data/khipro/), MIT licensed: